package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

@Getter
public enum IsDeleteEnums {
    DELETED(1,"已删除"),
    UN_DELETED(0,"未删除");

    private int value;
    private String desc;
    IsDeleteEnums(int code, String desc) {
        this.value = code;
        this.desc = desc;
    }

    public static IsDeleteEnums getByCode(int codeVal){
        for(IsDeleteEnums resultCode : IsDeleteEnums.values()){
            if (resultCode.value == codeVal){
                return resultCode;
            }
        }
        return null;
    }
}
